import Vue from 'vue'
import App from './App.vue'
import router from './router'
Vue.config.productionTip = false
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

import VueCookies from 'vue-cookies'
Vue.use(VueCookies)

import filters from './filter/index'
for (const key in filters) {
  Vue.filter(key, filters[key])
}

router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next();
});

router.afterEach(() => {
});
new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
